#ifndef UTIL_H
#define UTIL_H

#include <QLabel>
#include <QPushButton>
#include <QString>
#include <QThreadPool>

#define MAIN_LOGIN_INDEX 0
#define PHONE_LOGIN_INDEX 1

extern QThreadPool *globalThreadPool; //进行声明

enum role { OUTPUTLEVEL, INPUTLEVEL };

void setPushBtn(QPushButton *btn,
                const QString &objectName,
                const QSize &size,
                const QString &text,
                const QString &styleSheet,
                bool useIcon,
                const QString &iconURL,
                const uint8_t width = 0,
                const uint8_t heigth = 0);

void setLable(QLabel *label,
              const QString &objectName,
              const QString &labelText,
              const QString &FontFamily,
              const uint8_t fontSize);

void setQFont(QFont &font, const QString &FontFamily, const uint8_t fontSize, bool Bold);

void changeIcon(QAbstractButton *btn, const QString &iconURL);

QLabel *addSpaceLabel(QSize size);
#endif // UTIL_H
